@import './variables.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './handle.scss';
@import './font.scss';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: 'Alibaba-PuHuiTi-Regular';
  zoom: 1.0;
  overflow-x: hidden;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
  overflow: hidden;
  @include background_color('basic_bg_color');
  @include background_image('basic_bg');
  color: #ffffff;
  user-select: none;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: ' ';
    clear: both;
    height: 0;
  }
}

// main-container global css
.app-container {
  padding: 20px;
}

/* flex-layout.css */

.flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.flex-center {
  justify-content: center;
  align-items: center;
}

.flex-a-center {
  align-items: center;
}

.flex-j-center {
  justify-content: center;
}

.flex-space-between {
  justify-content: space-between;
}

.flex-space-around {
  justify-content: space-around;
}

.flex-start {
  justify-content: flex-start;
  align-items: flex-start;
}

.flex-end {
  justify-content: flex-end;
  align-items: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-grow {
  flex-grow: 1;
}

/* 设置滚动条的宽度、高度、背景色和边框样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 8px; // 纵向滚动条必写
  background-color: #f5f5f5;
  border-radius: 6px;
}

//水平方向滚动条
::-webkit-scrollbar:horizontal {
  width: 6px;
}

//垂直方向滚动条
.el-table__body-wrapper::-webkit-scrollbar {
  width: 10px; // 横向滚动条
  height: 8px; // 纵向滚动条必写
}

el-table__cell.gutter {
  background: rgba(0, 143, 255, 0.5); //表头的后面小空白颜色修改
}

// 水平方向和垂直方向滚动条交接处
::-webkit-scrollbar-corner {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  //@include background_color('basic_color');
  background: #999999;
  border-radius: 6px;
  width: 6px;
}

.my-dialog {
  @include background_color('dialog_bg_color');
  @include border_image('dialog_border_image');
  border: 1px solid;

  .el-dialog__header {
    @include background('dialog_header_bg_color');
    border-radius: 8px;
    border: 1px solid;
    padding: 0px;
    @include border_image('dialog_border_image');

    .el-dialog__title {
      width: 100%;
      display: inline-block;
      height: 72px;
      line-height: 72px;
      color: #ffffff;
      font-size: 24px;
      font-family: AlibabaPuHuiTi-Medium;
      @include background_image('dialog_header_border_image');
      background-position: center;
      background-repeat: no-repeat;
      background-size: 60% 100%;
    }

    .el-dialog__headerbtn {
      top: 25px;
      font-size: 20px;

      .el-dialog__close {
        border: 2px solid #ffffff;
        color: #ffffff;
      }
    }
  }
}

.btn-img {
  width: 16px;
  margin-left: 5px;
}

/* 弹窗中的按钮样式 */
.dialog-btn {
  width: 156px;
  -webkit-clip-path: polygon(
                  8px 0,
                  calc(100% - 8px) 0,
                  100% 25%,
                  100% 75%,
                  calc(100% - 8px) 100%,
                  8px 100%,
                  0 75%,
                  0 25%
  );
  clip-path: polygon(
                  10px 0,
                  calc(100% - 10px) 0,
                  100% 20%,
                  100% 80%,
                  calc(100% - 10px) 100%,
                  10px 100%,
                  0 80%,
                  0 20%
  );
}

.chamfer-corners-10 {
  -webkit-clip-path: polygon(
                  10px 0,
                  calc(100% - 10px) 0,
                  100% 10px,
                  100% calc(100% - 10px),
                  calc(100% - 10px) 100%,
                  10px 100%,
                  0 calc(100% - 10px),
                  0 10px
  );
  clip-path: polygon(
                  10px 0,
                  calc(100% - 10px) 0,
                  100% 10px,
                  100% calc(100% - 10px),
                  calc(100% - 10px) 100%,
                  10px 100%,
                  0 calc(100% - 10px),
                  0 10px
  );
}

.chamfer-corners-5 {
  -webkit-clip-path: polygon(
                  5px 0,
                  calc(100% - 5px) 0,
                  100% 5px,
                  100% calc(100% - 5px),
                  calc(100% - 5px) 100%,
                  5px 100%,
                  0 calc(100% - 5px),
                  0 5px
  );
  clip-path: polygon(
                  5px 0,
                  calc(100% - 5px) 0,
                  100% 5px,
                  100% calc(100% - 5px),
                  calc(100% - 5px) 100%,
                  5px 100%,
                  0 calc(100% - 5px),
                  0 5px
  );
}

.chamfer-corners-8 {
  -webkit-clip-path: polygon(
                  8px 0,
                  calc(100% - 8px) 0,
                  100% 8px,
                  100% calc(100% - 8px),
                  calc(100% - 8px) 100%,
                  8px 100%,
                  0 calc(100% - 8px),
                  0 8px
  );
  clip-path: polygon(
                  8px 0,
                  calc(100% - 8px) 0,
                  100% 8px,
                  100% calc(100% - 8px),
                  calc(100% - 8px) 100%,
                  8px 100%,
                  0 calc(100% - 8px),
                  0 8px
  );
}

.chamfer-98 {
  width: 96px;
  -webkit-clip-path: polygon(
                  10% 0,
                  90% 0,
                  100% 20%,
                  100% 80%,
                  90% 100%,
                  10% 100%,
                  0 80%,
                  0 20%
  );
  clip-path: polygon(
                  10px 0,
                  calc(100% - 10px) 0,
                  100% 20%,
                  100% 80%,
                  calc(100% - 10px) 100%,
                  10px 100%,
                  0 80%,
                  0 20%
  );
}

.chamfer-70 {
  width: 70px;
  -webkit-clip-path: polygon(
                  10% 0,
                  90% 0,
                  100% 20%,
                  100% 80%,
                  90% 100%,
                  10% 100%,
                  0 80%,
                  0 20%
  );
  clip-path: polygon(
                  15% 0,
                  85% 0,
                  100% 20%,
                  100% 80%,
                  85% 100%,
                  15% 100%,
                  0 80%,
                  0 20%
  );
}

// 表单样式
.form-top {
  .el-form-item__label {
    font-size: 18px;
    color: #fff;
    text-align: right !important;
  }

  .el-input__inner {
    @include form_input_color('form_top_bg_color');
    border: none;
    color: #000000;
    font-size: 16px;

    &::placeholder {
      @include font_color('form_top_input_color');
    }

    -webkit-clip-path: polygon(
                    10% 0,
                    90% 0,
                    100% 20%,
                    100% 80%,
                    90% 100%,
                    10% 100%,
                    0 80%,
                    0 20%
    );
    clip-path: polygon(
                    10px 0,
                    calc(100% - 10px) 0,
                    100% 20%,
                    100% 80%,
                    calc(100% - 10px) 100%,
                    10px 100%,
                    0 80%,
                    0 20%
    );
  }

  .el-select .el-input .el-select__caret {
    @include font_color('form_top_icon_color');

    &:before {
      content: '\e78f';
      font-size: 24px;
    }
  }

  .el-icon-time:before {
    content: '\e71f';
    @include font_color('form_top_input_color');
    font-size: 16px;
  }
}

// 表格样式
.table-normal {
  .el-table {
    margin-top: 16px;
    background: transparent;
    border: none;

    .el-table__body-wrapper {
      padding-bottom: 10px;

      .el-table__empty-block {
        min-height: 400px;
        font-size: 22px;
      }

      .el-table__expanded-cell {
        .el-table__body-wrapper {
          min-height: 0;

          .el-table__empty-block {
            min-height: 100px;
            font-size: 20px;
          }
        }
      }
    }

    // 表头行样式
    .tableHeader {
      height: 48px;
      @include table_head_bgcolor('table_head_bgcolor');
      -webkit-clip-path: polygon(
                      10px 0,
                      calc(100% - 10px) 0,
                      100% 15%,
                      100% 85%,
                      calc(100% - 10px) 100%,
                      10px 100%,
                      0 85%,
                      0 15%
      );
      clip-path: polygon(
                      10px 0,
                      calc(100% - 10px) 0,
                      100% 15%,
                      100% 85%,
                      calc(100% - 10px) 100%,
                      10px 100%,
                      0 85%,
                      0 15%
      );
    }

    // 表头单元格样式
    .tableTrHeader {
      background-color: transparent;
      border: none;
      font-weight: 400;
      color: #fff;
      font-size: 18px;
    }

    // 表格行样式
    .tableRow {
      background-color: transparent;
      border: none;
    }

    // 表格单元格样式
    .tableCell {
      background: transparent;
      border: none;
      color: #fff;
      font-size: 18px;
      font-weight: 400;
    }

    // 表格全选框去除空框
    .DisabledSelection .cell .el-checkbox__inner {
      display: none;
      position: relative;
    }

    // 表格全选框改为：选择
    .DisabledSelection .cell:before {
      content: '选择';
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }
  }
}

.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
  @include background('table_hover_color');
}

// 修改下拉列表样式
.el-select-dropdown__list {
  max-height: 200px;
  overflow-y: auto;
}

.el-select-dropdown__item {
  font-size: 18px !important;
  height: 44px !important;
  line-height: 44px !important;
}

// 修改选择时间样式
.el-picker-panel, .has-time {
  .el-picker-panel__body-wrapper {
    .el-picker-panel__body {
      .el-date-picker__time-header {
        .el-input--small {
          font-size: 18px;
          color: #000000;
        }

        .el-time-panel {
          left: -24px;

          .el-time-spinner__item {
            font-size: 16px;
          }

          .el-time-panel__footer {
            .el-time-panel__btn {
              font-size: 16px;
            }
          }
        }
      }

      .el-date-picker__header {
        line-height: 38px;

        .el-picker-panel__icon-btn {
          font-size: 18px;
        }

        .el-date-picker__header-label {
          font-size: 18px;
        }
      }

      .el-picker-panel__content {
        margin-top: 0;

        .el-date-table {
          font-size: 16px;
        }
      }
    }

    .el-year-table {
      font-size: 16px;
    }

    .el-month-table {
      font-size: 16px;
    }
  }

  .el-picker-panel__footer {
    .el-button--mini {
      padding: 10px 15px;
      font-size: 16px;
    }
  }
}

.el-date-editor {
  .el-range__icon {
    font-size: 16px !important;
    color: #303030 !important;
  }

  .el-range-input {
    background: none;
    font-size: 16px !important;
    color: #303030 !important;

  }

  input::-webkit-input-placeholder {
    color: #3e4458 !important;
  }

  input-placeholder {
    color: #3e4458 !important;
  }
}

// 提示弹出框样式
.el-message {
  min-width: 400px;

  .el-message__icon {
    font-size: 18px;
  }

  .el-message__content {
    font-size: 18px;
  }
}
